<!DOCTYPE html>
<html lang="en">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>GCC 2.95 C++ Features</title>
<link rel="stylesheet" type="text/css" href="https://gcc.gnu.org/gcc.css" />
</head>

<body>
<h1>GCC 2.95 C++ Features</h1>

<pre>
*** Changes in GCC 2.95:

* Messages about non-conformant code that we can still handle ("pedwarns")
  are now errors by default, rather than warnings.  This can be reverted
  with -fpermissive, and is overridden by -pedantic or -pedantic-errors.

* String constants are now of type `const char[n]', rather than `char[n]'.
  This can be reverted with -fno-const-strings.

* References to functions are now supported.

* Lookup of class members during class definition now works in all cases.

* In overload resolution, type conversion operators are now properly
  treated as always coming from the most derived class.

* C99-style restricted pointers are supported, using the `__restrict'
  keyword.

* You can now use -fno-implicit-inline-templates to suppress writing out
  implicit instantiations of inline templates.  Normally we do write them
  out, even with -fno-implicit-templates, so that optimization doesn't
  affect which instantiations are needed.

* -fstrict-prototype now also suppresses implicit declarations.

* Many obsolete options have been removed: -fall-virtual, -fmemoize-lookups,
  -fsave-memoized, +e?, -fenum-int-equivalence, -fno-nonnull-objects.

* Unused virtual functions can be discarded on some targets by specifying
  -ffunction-sections -fvtable-gc to the compiler and --gc-sections to the
  linker.  Unfortunately, this only works on Linux if you're linking
  statically.

* Lots of bugs stomped.

*** Changes in EGCS 1.1:

* Namespaces are fully supported.  The library has not yet been converted 
  to use namespace std, however, and the old std-faking code is still on by
  default.  To turn it off, you can use -fhonor-std.

* Massive template improvements:
  + member template classes are supported.
  + template friends are supported.
  + template template parameters are supported.
  + local classes in templates are supported.
  + lots of bugs fixed.

* operator new now throws bad_alloc where appropriate.

* Exception handling is now thread safe, and supports nested exceptions and
  placement delete.  Exception handling overhead on x86 is much lower with
  GNU as 2.9.

* protected virtual inheritance is now supported.

* Loops are optimized better; we now move the test to the end in most
  cases, like the C front end does.

* For class D derived from B which has a member 'int i', &amp;D::i is now of
  type 'int B::*' instead of 'int D::*'.

* An _experimental_ new ABI for g++ can be turned on with -fnew-abi.  The
  current features of this are more efficient allocation of base classes
  (including the empty base optimization), and more compact mangling of C++
  symbol names (which can be turned on separately with -fsquangle).  This
  ABI is subject to change without notice, so don't use it for anything
  that you don't want to rebuild with every release of the compiler.

  As with all ABI-changing flags, this flag is for experts only, as all
  code (including the library code in libgcc and libstdc++) must be
  compiled with the same ABI.
</pre>

</body>
</html>
